// pages/posts/posts.js

var postData = require("../../data/posts_data.js");
Page({

  /**
   * 页面的初始数据
   */
  data: {},

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onPostTap: function(event) {
    // console.log(event)
    var postId = event.currentTarget.dataset.postid;
    wx.navigateTo({
      // url: '../posts/post-detail/post-detail'
      url: '/pages/posts/post-detail/post-detail?id=' + postId
    })

  },

  onReady: function() {
    this.setData({
      post_content: postData.postList
    })
    console.log(11)
  },
  onPullDownRefresh: function() {
    console.log("下拉刷新")
  },
  tests: function(option) {
    // console.log(option)
    console.log("点击了")
    wx.startPullDownRefresh(
      // console.log("刷新触发\"")
    )
  }


})